
var grid_foc = "FiberOpticCableTable" ;

var FOCDsOption={
	fields:[{name:'key_str'},{name:'author'},{name :'remote_addr'},{name:'date',type:'date'},{name:'sh_descr'},{name:'descr'},{name:'typeid'},{name:'typeuuid'},{name:'modnum'},{name:'fibernum'}],
	recordType:'object'};
	
var FOCColsOption = [
	 {id: 'key_str' , header: "key" , width :30 },
	 {id: 'typeid' , header: "typeid" , width :70 },
	 {id: 'typeuuid' , header: "typeuuid" , width :70 },
     {id: 'date' , header: "date" , width :80  },
     {id: 'sh_descr' , header: "sh_descr" , width :220, editor: { type :"text" }},
	 {id: 'descr' , header: "descr" , width :220, editor: { type :"text" }},
	 {id: 'modnum' , header: "modnum" , width :70, editor: { type :"text" }},
	 {id: 'fibernum' , header: "fibernum" , width :70, editor: { type :"text" }},
     {id: 'author' , header: "author" , width :220  },
     {id: 'remote_addr' , header: "remote_addr" , width :220  }
];

var FOCGridOption = { //Таблица с оборудованием ЛЕВАЯ
	id : grid_foc,
	loadURL : 'controller/foc.php',
	saveURL : 'controller/foc.txt',

	exportURL : './export.php',
	exportFileName : 'test_export_doc',

	width: "100%",//"1220",  //"100%", // 700,
	height: "250",  //"100%", // 330,
	container : 'gridfocbox', 
	clickStartEdit: false,
	toolbarPosition : 'bottom',
//	replaceContainer : true, 
	replaceContainer : false, 
	encoding : 'UTF-8', // Sigma.$encoding(), 
	dataset : FOCDsOption ,
	columns : FOCColsOption ,
//	skin : 'vista' ,
	pageSize: 8,
	pageSizeList: [4,8,16,32,64,128,256],
//	showGridMenu : true,
	allowCustomSkin : true,
	allowFreeze : true,
	allowGroup : true,
	allowHide : true,
	remoteSort : false,
	remoteFilter : false,
	toolbarContent : 'nav goto | pagesize | reload | add del | save | | print | | pdf | state'
//	toolbarContent : 'nav goto | pagesize | myreload | add | save | | print | | pdf | state'
//	toolbarContent : 'nav goto | pagesize | reload | save add del | print csv xls xml pdf filter chart | state'
};

var focgrid=new Sigma.Grid(FOCGridOption);
Sigma.Util.onLoad(function(){focgrid.render()});
